package com.mszlu.blog.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mszlu.blog.dao.pojo.Tag;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: SJP
 * Date: 2022/2/25
 * Time: 21:51
 *
 * @author sjp
 * Description: No Description
 */
public interface TagMapper extends BaseMapper<Tag> {
    /**
     * 查询最热的标签id
     * @param limit
     * @return
     */
    List<Long> findHotsTagIds(int limit);

    /**
     * 根据文章的id查询标签列表
     * @param articleId
     * @return
     */
    List<Tag> findTagByArticleId(Long articleId);

    /**
     * 根据tagid查询tagname
     * @param tagIds
     * @return
     */
    List<Tag> findTagsByTagIds(List<Long> tagIds);
}
